#ifndef __CCONSOLE_H__
#define __CCONSOLE_H__

//---------------------------------------------------------------------------//
// Console
//---------------------------------------------------------------------------
#include <iostream>
#include <string>
#include <fstream>
#include <cmath>
#include <vector>
#include <stdio.h>
#include <fstream>
#include <map>
#include <sstream>
#include "CCommand.h"

class CAlias{
public:
  std::string name;
  std::string cmd;

  CAlias(std::string p_name, std::string p_cmd):name(p_name),cmd(p_cmd){};
};

class CConsole{
public :
  std::string m_Current;
  std::vector< std::string *> vconsole;
  std::vector< std::string *> lastCmds;
  std::vector <cmd *> cmds;
  std::vector <CAlias *> alias;
  int m_i_history;

  //---------------------------------------------------------------------------
  // Constructeur par defaut
  CConsole();
  
  

  //---------------------------------------------------------------------------
  // Ajoute du texte dans la console
  void addConsole(std::string text);
  void addLastCmd(std::string text);

  //---------------------------------------------------------------------------
  // Execute la commande
  int ProcessCurrent(std::string argv);

  //----------------------------------------------------------
  // Envoie un nouveau caractere a la console
  void SendChar(char Character);

  void setHistory(int p_i_dec);
};

#endif // __CCONSOLE_H__
